import Vue from 'vue'
import Router from 'vue-router'

import footer from '@/components/footer'
Vue.use(Router)
export default new Router({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/home',
      name: 'home',
      meta: { requireAuth: true },
      components: {
        default: () => import('@/views/home/home'),
        footer: footer
      }
    },
    //  新闻
    {
      path: '/news',
      name: 'news',
      meta: { requireAuth: true },
      components: {
        default: () => import('@/views/news/news_home'),
        footer: footer
      }
    },

    // 新闻详情
    {
      path: '/newsdetail',
      name: 'newsdetail',
      components: {
        default: () => import('@/views/news/news_detail'),
        footer: footer
      }
    },
    {
      path: '/adopt',//领养
      name: 'adopt',
      meta: { requireAuth: true },
      components: {
        default: () => import('@/views/adopt/adopt_home'),
        footer: footer
      }
    },
    // {
    //   path: '/foster',//寄养
    //   name: 'foster',
    //   meta: { requireAuth: true },
    //   components: {
    //     default: () => import('@/views/foster/foster_home'),
    //     footer: footer
    //   }
    // },

   
    {
      path: '/register',
      name: 'register',
      components: {
        default: () => import('@/views/register'),
      }
    },
    {
      path: '/',
      name: 'login',
      components: {
        default: () => import('@/views/login'),
      }
    },
  
   
    {
      path: '/forget',
      name: 'forget',
      components: {
        default: () => import('@/views/forget'),
        footer:footer
      }
    },
    {
      path: '/about',
      name: 'about',
      components: {
        default: () => import('@/views/about/about_home'),
        footer: footer
      }
    },
    {
      path: '/petsinfo',
      name: 'petsinfo',
      components: {
        default: () => import('@/views/adopt/petsinfo'),
        footer: footer
      }
    },
    
  ]
})


